<!DOCTYPE html>
<html>
<head>
    <title>附件信息</title>
    <meta name="layout" content="main"/>
    <asset:stylesheet src="homer/vendor/viewer/viewer.min.css"/>
</head>

<body class="fixed-navbar fixed-sidebar">
<div class="content animate-panel docs-pictures">
        <div class="row">
            <div class="hpanel">

                <div class="panel-heading">
                    <div class="panel-tools">

                    </div>
                    ${this.attachment?.type?.name}
                </div>

                <div class="panel-body p-xs">
                        <div class="col-lg-3">
                            <div class="hpanel">

                                <div class="panel-heading">
                                    <div class="panel-tools">

                                    </div>
                                    ${this.attachment?.type?.name}
                                </div>

                                <div class="panel-body imgBox">
                                    <g:if test="${this.attachment?.fileName?.split('\\.')[-1] in ['doc', 'docx', 'pdf', 'xlsx', 'xls']}">
                                        <a href="${this.attachment?.fileUrl}">附件信息：${this.attachment?.fileName?.split('/')[-1]}
                                            <h5 class="text-info">点击查看</h5>
                                        </a>
                                    </g:if>
                                    <g:if test="${this.attachment?.fileName?.split('\\.')[-1] in ['jpg', 'png', 'jpeg']}">
                                        <a href="javascript:;" tthis.attachmentle="${this.attachment?.type?.name}">
                                            <g:if test="${this.attachment?.thumbnailUrl}">
                                                <img src="${this.attachment?.thumbnailUrl}" data-original="${this.attachment?.fileUrl}"
                                                     alt="${this.attachment?.type?.name}"/>
                                            </g:if>
                                            <g:else>
                                                <img src="${this.attachment?.fileName}" data-original="${this.attachment?.fileUrl}"
                                                     alt="${this.attachment?.type?.name}"/>
                                            </g:else>
                                        </a>
                                    </g:if>
                                </div>

                                <div class="panel-footer tooltip-demo">
                                    <g:if test="${this.attachment?.description}">
                                        <g:link class="btn-link description-edit" controller="attachment" action="edit" params="[id: this.attachment?.id]" data-toggle="tooltip" data-placement="left"
                                                tthis.attachmentle="${this.attachment?.description}">${this.attachment?.description}
                                        </g:link>
                                    </g:if>
                                    <g:formatDate date="${this.attachment.createdDate}" format="yyyy-MM-dd HH:mm:ss"></g:formatDate>
                                </div>
                            </div>
                        </div>

                </div>
            </div>
        </div>
</div>
<asset:javascript src="homer/vendor/viewer/viewer.min.js"/>
<asset:javascript src="homer/vendor/viewer/main.js"/>
</body>
</html>
